package top.milkbox.service.impl;

import org.springframework.stereotype.Service;
import top.milkbox.info.AllVariable;
import top.milkbox.service.VariableNamerService;
import top.milkbox.utils.GuoUtilsVariableName;

@Service
public class VariableNamerServiceImpl implements VariableNamerService {
    /**
     * 获取一句话的所有变量格式
     *
     * @param source 原字符串
     * @return 所有的变量格式
     */
    @Override
    public AllVariable getAllVariable(String source) {
        AllVariable allVariable = new AllVariable();
        allVariable.setBarbecue(GuoUtilsVariableName.getBarbecue(source));
        allVariable.setConstant(GuoUtilsVariableName.getConstant(source));
        allVariable.setHumpFirstLower(GuoUtilsVariableName.getHumpFirstLower(source));
        allVariable.setHumpFirstUpper(GuoUtilsVariableName.getHumpFirstUpper(source));
        allVariable.setUnderLine(GuoUtilsVariableName.getUnderline(source));
        return allVariable;
    }
}
